package com.yatu.codegen.util;

import com.yatu.codegen.db.DBConn;

public final class ThreadLocalUtil {
	private static ThreadLocal<DBConn> threadLocal = new ThreadLocal<>();

	private ThreadLocalUtil() {
	}

	public DBConn get() {
		DBConn dbConn = threadLocal.get();
		if (dbConn == null) {
			threadLocal.set(new DBConn());
		}
		return dbConn;
	}

}
